<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui">
    <meta name="author" content="">
    <title></title>  <link rel="icon" href="/template/pc1/images/wmh_favicon.ico" type="image/x-icon" />
    <% include("../inc/input_css.html"){}%>
    <style>
        label{
            width: 140px!important;
        }
    </style>

    <%
    var isAdd = false;
    var isEdit = false;
    if(isEmpty(brand.id)){
    isAdd = true;
    }else{
    isEdit = true;
    }%>

</head>

<body>
<div class="ibox">
    <div class="ibox-title">
        <div class="pull-left mbx navbar_title">
            <span class="current">商城管理</span>
            <span class="line">/</span>
            <span class="current"><a href="list">品牌管理</a></span><span class="line">/</span>
            <%if(isAdd){%>添加品牌<%}else{%>编辑品牌<%}%>
        </div>
    </div>
    <div class="ibox-content">
        <div class="wrapper wrapper-content">
            <div class="row">
                <div class="padding-40">
                    <form class="form-horizontal form-validate" method="post" id="form" action="<%if(isAdd){%>save<%}else{%>update<%}%>">
                        <input type="hidden" name="brand.id" value="${brand.id!}" />
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><span class="maroon">*</span>品牌名称</label>
                            <div class="col-sm-3">
                                <input type="text" name="brand.name" value="${brand.name!}" class="form-control light-input" required="true">
                            </div>

                        </div>

                        <div class="form-group">
                            <label class="col-sm-2 control-label">品牌LOGO</label>
                            <div class="col-sm-3">
                                <input type="hidden" name="brand.logo" value="${brand.logo!}" class="pull-left form-control light-input"/>
                                <img class="img-rounded" src="${brand.logo!}" style="max-height:50px;"/>
                                <input type="button" class="button browserButton" value="选择文件" style="line-height: normal"/>
                                <span class="help-block"><span class="maroon"></span>建议300*300像素；格式jpg</span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><span class="maroon"></span>网址</label>
                            <div class="col-sm-3">
                                <input type="text" name="brand.url" value="${brand.url!}" class="form-control light-input">
                            </div>

                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label"><span class="maroon"></span>排序</label>
                            <div class="col-sm-3">
                                <input type="text" name="brand.orderList" value="${brand.orderList!}" class="form-control light-input">
                            </div>

                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">介绍描述</label>
                            <div class="col-sm-3">
                                <textarea id="personInfo" name="brand.introduction" rows="10" style="width: 100%">${brand.introduction!}</textarea>
                            </div>
                        </div>

                        <div class="form-group" style="margin-top: 24px">
                            <label class="col-sm-2 control-label "></label>
                            <div class="col-sm-4 col-sm-offset-0">
                                <button class="hive-btn-cancle" id="btn_cancle" type="button" onclick="history.back()">&nbsp;取消&nbsp;</button>
                                <button class="hive-btn hive-btn-primary margin-left-8" type="submit">&nbsp;提交&nbsp;
                                </button>
                            </div>
                        </div>

                    </form>


                </div>
            </div>
        </div>
    </div>
</div>

<% include("../inc/input_js.html"){}%>
<!-- 自定义js -->
<script type="text/javascript">
    var uploadUrl="/file/uploadfile?shopId=${shopId!}&type=d";
    var browserUrl="/file/browser?shopId=${shopId!}";
</script>
<script src="https://static.9hive.cn/global/vendor/file/file.js"></script>
<script type="text/javascript">
    $(function () {
        $("input.browserButton").browser();
        $('.i-checks').iCheck({
            checkboxClass: 'icheckbox_flat-blue',
            radioClass: 'iradio_flat-blue',
        });

    })
</script>

<!-- 自定义js -->
<!--kindEditor-->
<script src="https://static.9hive.cn/global/vendor/kindeditor/kindeditor-all-min.js"></script>
<script src="https://static.9hive.cn/global/vendor/kindeditor/lang/zh-CN.js"></script>
<script type="text/javascript">
    KindEditor.ready(function (K) {
        personInfoeditor = K.create("#personInfo", {
            themeType: 'simple',
            allowFileManager: true,
            width:"300%",
            height:"260px",
            uploadJson: '${base}/file/uploadfile?shopId=${shopId!}&type=k',
            fileManagerJson: '${base}/file/fileManagerJson?shopId=${shopId!}'
        });
    });
</script>

</body>
</html>